<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>出勤列表</title>
    <!-- 静态包含,静态包含会把jsp合并过来形成一个整个servlet输出. 动态会多个sevlet的结果合并 -->
    <%@include file="common/head.jsp" %>
    <!-- 引入jstl -->
    <%@include file="common/taglib.jsp" %>
    <!-- 项目公共 JavaScript 文件 -->
    <script src="/resources/js/common/common.js"></script>
    <script src="/resources/js/common/pageHandler.js"></script>
    <script src="/resources/js/chuqin.js"></script>
</head>
<body>
<!-- 页面显示部分 -->
<div class="container-fluid">
    <div class="row">
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
            <div class="alert fade col-sm-offset-3 col-sm-4 text-center alert-msg" id="alertMsg"></div>
            <div class="panel panel-default">
                <div class="panel-body">
                    <div class="col-sm-3">
                        <input type="text" class="form-control" id="searchInput"  value="">
                        <input type="hidden" class="form-control" id="commitInput"  value="">
                        <input type="hidden" class="form-control" id="currentPage"  value="1">
                        <input type="hidden" class="form-control" id="pageNumber"  value="">
                        <input type="hidden" class="form-control" id="totalPage"  value="">
                    </div>
                    <div class="col-sm-6">
                        <div class="input-group">
                            <input type="text" class="form-control form-datepicker" id="ksrq" value="" placeholder="选择起始日期">
                            <div class="input-group-addon">-</div>
                            <input type="text" class="form-control form-datepicker" id="jsrq" value="" placeholder="选择结束日期">
                        </div>
                    </div>
                    <div class="col-sm-3 text-right">
                        <button class="btn btn-default" onclick="zhigong.searchData('chuqin')">查询</button>
                        <button class="btn btn-default" onclick="zhigong.openModal('chuqin','new')">新增</button>
                    </div>
                </div>
            </div>

            <div class="panel panel-default data-table" id="dataTable">
                <div class="table-responsive">
                    <table class="table table-hover text-center">
                        <thead>
                        <tr>
                            <th>员工编号</th>
                            <th>姓名</th>
                            <th>日期</th>
                            <th>上班时间</th>
                            <th>下班时间</th>
                            <th>备注</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody id="tbodyList">

                        </tbody>
                    </table>
                </div>
            </div>
            <div class="page col-sm-12 text-right" id="pageWrap">
                <ul class="pagination">
                    <li class="disabled"><a href="javascript:void(0);" onclick="prePage(this)">&laquo;</a></li>
                    <li class="active"><a href="javascript:void(0);" onclick="transPage(this, 'chuqin')">1</a></li>
                    <li><a href="javascript:void(0);" onclick="transPage(this, 'chuqin')">2</a></li>
                    <li><a href="javascript:void(0);" onclick="transPage(this, 'chuqin')">3</a></li>
                    <li><a href="javascript:void(0);" onclick="transPage(this, 'chuqin')">4</a></li>
                    <li><a href="javascript:void(0);" onclick="transPage(this, 'chuqin')">5</a></li>
                    <li><a href="javascript:void(0);" onclick="nextPage(this)" >&raquo;</a></li>
                </ul>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" tabindex="-1" role="dialog" id="dataModal">

    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title">出勤维护</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" role="form">
                    <div class="form-group">
                        <label for="ygbh" class="col-sm-2 col-sm-offset-1 control-label">员工编号</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control prikey" id="ygbh" disabled value="">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="xm" class="col-sm-2 col-sm-offset-1 control-label">姓名</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" id="xm" value="" placeholder="请输入姓名">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="rq" class="col-sm-2 col-sm-offset-1 control-label">日期</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control prikey form-datepicker" id="rq" value="" placeholder="请选择入职日期">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="csrq" class="col-sm-2 col-sm-offset-1 control-label">出生日期</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control form-datepicker" id="csrq" value="" placeholder="请选择出生日期">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="sbsj" class="col-sm-2 col-sm-offset-1 control-label">上班时间</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" id="sbsj" value="" placeholder="请输入上班时间,格式HH:mm">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="xbsj" class="col-sm-2 col-sm-offset-1 control-label">下班时间</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" id="xbsj" value="" placeholder="请输入下班时间,格式HH:mm">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="bz" class="col-sm-2 col-sm-offset-1 control-label">备注</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" id="bz" value="" placeholder="请输入备注">
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" id="saveBtn" onclick="zhigong.saveData('chuqin')">保存</button>
            </div>
        </div>
    </div>
</div>

<!-- 删除时弹出 -->
<input type="hidden" id="common_confirm_btn" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#common_confirm_model">
<div id="common_confirm_model" class="modal">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                <h5 class="modal-title"><i class="fa fa-exclamation-circle"></i> <span class="title"></span></h5>
            </div>
            <div class="modal-body small">
                <p ><span class="message"></span></p>
            </div>
            <div class="modal-footer" >
                <button type="button" class="btn btn-primary ok" data-dismiss="modal">确认</button>
                <button type="button" class="btn btn-default cancel" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>

</body>
</html>